package com.erp.order.service;


import com.erp.order.domain.bo.ErpSellerOrderExtendBo;
import com.erp.order.domain.bo.ErpSendOutGoodsBo;
import com.erp.order.domain.dto.ErpOrderReturnLogisticsPrice;
import com.erp.order.domain.vo.SearchEvaOrderVo;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.api.domain.ErpSellerChildOrderExtend;
import com.ruoyi.order.api.domain.ErpSellerOrder;
import com.erp.order.domain.vo.ErpSellerOrderSelVo;
import com.erp.order.param.QueryOrderParam;
import com.ruoyi.common.core.domain.PageQuery;
import com.ruoyi.common.core.web.oldPage.TableDataInfo;
import com.ruoyi.order.api.domain.ErpSellerOrderExtend;
import com.ruoyi.order.api.domain.ErpSellerStoreProductEvaluation;

import java.util.List;

/**
 * 卖家订单Service接口
 *
 * @author erp
 * @date 2023-03-08
 */
public interface IErpSellerOrderService {

    /**
     * 根据店铺cn码，获取最新一条的订单信息
     * @param storeUserName
     * @return
     */
    ErpSellerOrder getNewestOrderByStoreUserName(String storeUserName);

    /**
     * 查询订单和子订单列表
     */
    ErpSellerOrder queryOrderAndProduct(Long orderId);
//    /**
//     * 查询卖家订单
//     */
//    ErpSellerOrderVo queryById(Long id);
//
//    /**
//     * 查询卖家订单列表
//     */
//    TableDataInfo<ErpSellerOrderVo> queryPageList(ErpSellerOrderBo bo, PageQuery pageQuery);
//
//    /**
//     * 查询卖家订单列表
//     */
//    List<ErpSellerOrderVo> queryList(ErpSellerOrderBo bo);
//
//    /**
//     * 新增卖家订单
//     */
//    Boolean insertByBo(ErpSellerOrderBo bo);
//
//    /**
//     * 修改卖家订单
//     */
//    Boolean updateByBo(ErpSellerOrderBo bo);
//
//    /**
//     * 校验并批量删除卖家订单信息
//     */
//    Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);


    /**
     * 批量修改增量订单状态
     */
    Boolean batchChangeStatus();

    /**
     * 修改订单在erp内部的状态
     */
    int setInnerStatus(Long orderId, String status, String flag);

    ErpSellerOrder queryByOrderId(Long orderId);
//
//    Integer updateWarehouseCarrierService(ErpSellerOrder erpSellerOrder);
//
//
//    /**
//     * 从ae_store_order获取数据保存到erp_seller_order
//     */
////    Boolean importOrder();
//
//    /**
//     * 标记发货列表
//     */
//    TableDataInfo<ErpSellerOrder> markShipment(QueryOrderParam bo, PageQuery pageQuery);
//

    /**
     * 查询用户的需要声明发货的订单数量
     */
    Integer getStatementOrder(QueryOrderParam bo);
//
//    /**
//     * 根据订单信息获取订单的物流服务模板
//     * @return
//     */
//
//    List<AeLogisticsServiceName> logisticsServiceQueryNew(LogisticsServiceQueryDto logisticsServiceQueryDto);
//
//    List<AeLogisticsServiceName> logisticsServiceQueryOld(Long orderId, String sellerLoginId);
//
//    R<String> sellerShipmentForTop(String childIds);

    R<Object> getOrderSkuPackageInfo(Long orderId);
//
//    /**
//     *
//     * @param type 0:冻结; 1:扣款; 2:解冻
//     * @return
//     */
//    R<Object> freezeOrderAmount(Long orderId, Integer type);
//
//    BigDecimal getOrderProfit(Long orderId);

    R<Object> chooseSelfShipments(String orderIds);

    R<Object> uploadPurchaseInfo(Long childOrderId, String proof, String purchasePrice, String cnTrackingNo);

    R<Object> uploadSendInfo(ErpSellerOrderExtend erpSellerOrderExtend);

    R<Object> queryLogisticsOrderDetail(Long orderId);

//    void updateOrderStatusXXjob(Long orderId);

//    void returnLogisticsCharges(ErpOrderReturnLogisticsPrice order);

//    void disposeBehindErpPayOrder(ErpSellerOrder order);

//    void updateLogisticsOrderStatusXXjob(Long orderId);

//    R<Object> getOnlineLogisticsInfo(Long orderId);

    TableDataInfo<ErpSellerOrderSelVo> selectOrderListNew(PageQuery pageQuery, QueryOrderParam bo);

    ErpSellerOrder getInfoByOrderId(Long orderId);

    R<Object> sellerShipmentForMyself(ErpSellerOrderExtend erpSellerOrderExtend);

    R<Object> updateInnerStatusAndProcess(Long orderId, String aeOrderStatus, String orderProcessFlag, String erpOrderStatus);

//    R<Object> getErpAgentBranchInfoByStore(String storeStr);

//    R<Object> confirmOrderShippedType(Long orderId, Integer type);

//    Boolean uploadPurchaseProof(List<ErpSendOutGoodsBo> bo);

//    Boolean uploadLogisticsProof(ErpSellerOrderExtendBo bo);

//    ErpSellerOrderExtend getLogisticsProof(Long orderId);

//    ErpSellerChildOrderExtend getPurchaseProof(String childOrderId);

//    TableDataInfo<ErpSellerOrder> getSupplementOrder(PageQuery page, QueryOrderParam param);

    List<ErpSellerOrder> getStoreList();

    R<Object> queryPurchaseInfo(Long childOrderId);

    R<Object> getHandoverOrderStoreList();

    R<Object> cutAndErrorRedReminder();

    R<Object> redReminderForHandoverOrder();

    R<Object> sellerShipmentForOther(Long orderId, Integer type);

//    List<ErpSellerChildOrderExtend> getPurchaseProofList(Long orderId);
}
